package com.smart.manager.wiki.entities.body;

import com.smart.common.entities.core.BaseSearch;
import com.smart.manager.wiki.entities.enums.NoticeScope;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;


/**
 * @author xiaxuqiu
 * @date 2023/03/26
 */
public class RIntelRemind {

    @Data
    @EqualsAndHashCode(callSuper = true)
    @ApiModel("RIntelRemind1")
    public static class SearchBody extends BaseSearch {


        @ApiModelProperty("提醒名称")
        private String title;


    }


    @Data
    @ApiModel("RIntelRemind2")
    public static class EditBody implements Serializable {

        @ApiModelProperty("用户群体")
        @NotNull(message = " 用户群体  不能为空")
        private NoticeScope scope;

        @ApiModelProperty("提醒标题")
        @NotBlank(message = " 提醒标题  不能为空")
        @Length(max = 20, message = "提醒标题不能超过20个字符")
        private String title;

        @ApiModelProperty("提醒正文")
        @NotBlank(message = " 提醒正文  不能为空")
        @Length(max = 500, message = "提醒正文不能超过20个字符")
        private String content;

        @ApiModelProperty("收件人ID")
        @NotNull(message = " 收件人ID 不能为空")
        private Long recipientId;

    }


}
